<?php
	include "../controller/ConectBanco.php";
    include "../controller/Sessao.php";
	
	if($_SESSION["login"] != "admin"){
		header("location:../view/Principal.php");
	}
	
	$idSimCard = $_GET['idSimCard'];
	
	$querySimCard = mysql_query("SELECT * FROM simcard WHERE idSimCard = $idSimCard")or die(mysql_error());
	$arraySimCard = mysql_fetch_array($querySimCard);
?>	

<!DOCTYPE html>

    <head>
        <meta charset="UTF-8" />

        <title>Editar Sim Card</title>
        <link rel="stylesheet" type="text/css" href="../css/demo.css" />
        <link rel="stylesheet" type="text/css" href="../css/style.css" />
		
    </head>
    <body>
        <div class="container">
			<?php
				include "MenuAdmin.php";
				Menu::data();
				Menu::menuAdmin(); 
			?>
            <header>
                <h1>LOCALIZAGORA<span></br>Sistema de rastreamento via satelite </span></h1>
				
            </header>
            <section>				
                <div id="container_demo" >
                    <!-- hidden anchor to stop jump http://www.css3create.com/Astuce-Empecher-le-scroll-avec-l-utilisation-de-target#wrap4  -->
                    <div id="wrapper">
                        <div id="login" class="animate form">
                            <form  action="../controller/Editar.php?idSimCard=<?php echo $idSimCard;?>" method="post" autocomplete="on" > 
                                <h1>Editar Driver</h1> 
                                <p> 
									<label for="numero" class="numero"  > Numero </label>
                                   <input id="numero" name="numero" required="required" value="<?php echo $arraySimCard['numero'];?>" type="text" placeholder="05191858345"/>
                                </p>
                                <p> 
									<label for="numeroChip" class="numeroChip"  > Numero do Chip </label>
									<input id="numeroChip" name="numeroChip" required="required" value="<?php echo $arraySimCard['numeroChip'];?>" type="number" placeholder="89550-53159-00028-70810"/>
                                </p>
                                 <p> 
									<label for="plano" class="plano"  > Plano </label>
									<input id="plano" name="plano" required="required" value="<?php echo $arraySimCard['plano'];?>" type="number" placeholder="21/07/2013"/>
                                </p>
                                 <p> 
									<label for="vencPlano" class="vencPlano"  > Vencimento Plano </label>
									<input id="vencPlano" name="vencPlano" required="required" value="<?php echo $arraySimCard['vencimentoPlano'];?>" type="number" placeholder="89550-53159-00028-70810"/>
                                </p>
                              	
                               <br><br>
                                <p class="button"> 
                                    <input type="submit" value="Salva" /> 
								</p>
                            </form>
                        </div>
			
                    </div>
                </div>  
            </section>
        </div>
    </body>
</html>
